package com.quickd.service.service.wms.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.quickd.core.service.impl.BaseServiceImpl;
import com.quickd.service.entity.wms.StorageBin;
import com.quickd.service.mapper.wms.StorageMapper;
import com.quickd.service.entity.wms.Storage;
import com.quickd.service.service.wms.IStorageService;
import org.springframework.stereotype.Service;

/**
 * 仓库
 *
 * @author quickd quickd@dacanginfo.com
 * @since 2019-10-11
 */
@Service
public class StorageServiceImpl extends BaseServiceImpl<StorageMapper, Storage> implements IStorageService {

    @Override
    public Storage queryByCode(String code) {
        QueryWrapper<Storage> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(Storage::getCode, code);
        return  (Storage)baseMapper.selectOne(queryWrapper);
    }
}